CC = g++
LD = g++
prog = libsocket_cpp.dll
SRC = \
      blocking_policy.h \
      locking_policy.cpp \
      locking_policy.h \
      no_blocking_policy.cpp \
      no_blocking_policy.h \
      no_error_policy.h \
      no_locking_policy.h \
      socket.h \
      socket_exception.h \
      throwing_error_policy.h 
OBJ = \
      no_blocking_policy.o \
      locking_policy.o 

LDFLAGS = -lboost_thread-gcc-mt-1_33_1 -fleading-underscore -lws2_32 -lwsock32 -shared -LC:\\Boost\\lib -LC:\\MinGW\\lib -Wl,--out-implib,libsocket_cpp.a,--output-def,socket_cpp.def
CFLAGS = -g -DBUILD_DLL -IC:\\Boost\\include\\boost-1_33_1

all: $(prog)

${prog}: $(OBJ)
	$(LD) $(OBJ) -o $(prog) $(LDFLAGS)

%.o: %.cpp
	$(CC) $(CFLAGS) -c $< -o $@

clean:
	rm *.o
	rm $(prog)

run:
	./$(prog)
